package cn.cau.service.impl;

import cn.cau.dao.AuditingBotInfoDao;
import cn.cau.dao.BasicEnumDao;
import cn.cau.entity.AuditingBotInfo;
import cn.cau.entity.AuditingUtils;
import cn.cau.entity.Options;
import cn.cau.service.AuditingBotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class AuditingBotServiceImpl implements AuditingBotService {

    @Autowired
    BasicEnumDao basicEnumDao;

    @Autowired
    AuditingBotInfoDao auditingBotInfoDao;

    @Override
    public List<Options> findAllEnumByCodeId(int codeId) {
        return basicEnumDao.findAllEnumByCodeId(codeId);
    }

    @Override
    public int AddBotInfo(AuditingBotInfo auditingBotInfo) {
        return auditingBotInfoDao.addInfo(auditingBotInfo);
    }

    @Override
    public List<AuditingBotInfo> findAuditingBotInfoByCodeId(int id) {
        return auditingBotInfoDao.findBotInfoByCodeId(id);
    }

    @Override
    public List<AuditingBotInfo> findInfosByCodeIdAndSegName(AuditingUtils auditingUtils) {
        return auditingBotInfoDao.findInfoByCodeIdAndSegName(auditingUtils);
    }


    @Override
    public int updateInfo(AuditingBotInfo auditingBotInfo) {
        return auditingBotInfoDao.updateInfo(auditingBotInfo);
    }
}
